home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19990725-20000114
/
000264_news@columbia.edu _Fri Nov 5 16:59:52 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2000-01-13
|
5KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id QAA28206
for <kermit.misc@watsun.cc.columbia.edu>; Fri, 5 Nov 1999 16:59:52 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id QAA18856
for kermit.misc@watsun.cc.columbia.edu; Fri, 5 Nov 1999 16:44:19 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Subject: Re: UPS control on VMS, Kermit?
Date: 5 Nov 1999 21:44:18 GMT
Organization: Columbia University
Message-ID: <7vvj3i$id6$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <7vvddp$hum@gap.cco.caltech.edu>,
<mathog@seqaxp.bio.caltech.edu> wrote:
: Tripplite used to ship a program called PowerMon II with its Omnismart
: UPS, but no longer does and no longer supports that software. There was
: a CDROM that came from Compaq with our DS10, but it claims to support only
: Exide UPS systems. That said, near as I can tell, it is a variant of
: Powermon II.
:
: Anybody know of either a *supported* piece of UPS software or an
: implementation that already runs on OpenVMS?
:
: I took a quick look at some of the Linux stuff to see what would be
: involved in porting it. As you might expect, both genpowerd and upsd are
: based on ioctl() (blech!) Unfortunately ioctl() is not something that we
: can use on VMS to look at a serial line. In fact, it's none too
: portable on Unix either.
:
: The bottom line on all of these programs is that they talk to a modem like
: device on one of the serial ports. Kermit will do that, I think, and
: Kermit has scripts. That raises the possibility that maybe it would be
: possible to write a more portable implementation of a UPS monitor which
: runs entirely within Kermit. Initially all I want to be able to do is:
:
: 1. monitor the UPS
: 2. start a shutdown when a power failure is detected
: 3. cancel the shutdown when the power is restored
:
If all that would be dialog-driven, it's entirely possible with Kermit.
It's also possible by monitoring certain modem signals.
: Eventually it would be nice to also be able to:
:
: 4. signal other systems to shut down as part of the final shutdown
: sequence, either over a serial line or the network.
:
This would be more complicated, since it must involve cooperating processes
on the other systems, but certainly possible.
: Any thoughts on this from more experienced kermit users?
:
: If it can't be run entirely from within Kermit then how about a method,
: any method, for reading the serial port control lines?
:
: Apparently the UPS devices signal on those rather than through the data.
: Funny, in roughly 20 years with this OS I've never before had a need to
: read the control signals on a serial line directly.
:
Here is a brief session with C-Kermit 7.0:
http://www.columbia.edu/kermit/ck70.html
that shows it can access the modem-control lines:
$ kermit
C-Kermit 7.0.196 Beta.10+, 30 Oct 1999, for OpenVMS Alpha
Copyright (C) 1985, 1999,
Trustees of Columbia University in the City of New York.
Default file-transfer mode is AUTOMATIC
Type ? or HELP for help.
DKA0:[FDC] C-Kermit>set line tta0
DKA0:[FDC] C-Kermit>sho comm
Communications Parameters:
Line: _ALPHA2$TTA0:, speed: 9600, mode: local, modem: none
Parity: none, stop-bits: (default) (8N1)
Duplex: full, flow: xon/xoff, handshake: none
Carrier-watch: auto, close-on-disconnect: off
Terminal bytesize: 7, escape character: 28 (^\)
Carrier Detect (CD): Off
Dataset Ready (DSR): Off
Clear To Send (CTS): Off
Ring Indicator (RI): Off
Data Terminal Ready (DTR): On
Request To Send (RTS): On
DKA0:[FDC] C-Kermit>
C-Kermit 7.0 is recommended; I'm not sure if this stuff works at all in
earlier versions. The command for monitoring modem signals is WAIT:
DKA0:[FDC] C-Kermit>help wait
Syntax: WAIT { number-of-seconds, hh:mm:ss } [modem-signal(s)]
Examples:
wait 5 cd cts
wait 23:59:59 cd
Waits up to the given number of seconds or the given time of day for all
the specified modem signals to appear on the serial communication device.
Sets FAILURE if the signals do not appear in the given time or interrupted
from the keyboard during the waiting period. Also see HELP PAUSE.
Signals:
cd = Carrier Detect;
dsr = Dataset Ready;
cts = Clear To Send;
ri = Ring Indicate.
DKA0:[FDC] C-Kermit>exit
$
For sample Kermit scripts (but none of them relating specifically to UPS
control), see:
http://www.columbia.edu/kermit/ckscripts.html
If you develop a script for this, feel free to contribute it to the C-Kermit
script library.
- Frank